<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="app">
      <input type="text" v-model.number = 'num'>
      <input type="text" v-model.trim='num'>
      <input type="text" placeholder="没有lazy" v-model='msg' @input='myInput1'>
      <input type="text" placeholder="有lazy" v-model.lazy='msg' @input='myInput2'>
  </div>
  <script src="./vue.js"></script>
  <script>
    var vm = new Vue({
      el:'#app',
      data:{
          num:10,
          msg:''
      },
      methods:{
          myInput1() {
              console.log('无 lazy');
              console.log(this.msg);
          },
          myInput2() {
              console.log('有 lazy');
              console.log(this.msg);
          }
      }
     });
  </script>
</body>
</html>
